#include "prompts.h"

void MessageBox::setcontent(std::string newcontent) {
	content = newcontent;
}

std::string MessageBox::getcontent(void) {
	return content;
}

Response* MessageBox::update(TCOD_key_t key) {
	if(key.vk == TCODK_ENTER) {
		this->setBackgroundColor(TCODColor::white);
		this->rect(1, 1, width-2, height-2, true);
	}

	return new Response(false, "hi");
}

// background alpha, foreground alpha (bga, fga)
void MessageBox::blit(TCODConsole* dest, double bga, double fga) const {
    contentConsole->printLeftRect(2, 2, w-4, h-4, TCOD_BKGND_NONE, c.c_str());
    contentConsole->blit(this, 0.0, 0.0);
    TCODConsole::blit(this, x, y, width, height, dest, x, y);
}

